package net.sxnic.ugr.user.action;

import net.sxnic.ugr.UgrActionSupport;
import net.sxnic.ugr.context.AppContext;
import net.sxnic.ugr.user.User;
import net.sxnic.ugr.user.UserManager;

import org.springframework.beans.factory.annotation.Autowired;

/**
 * 
 * Introduction：查看用户信息action类
 * @author 孙宇飞
 * create date : 2010-5-16
 */
@SuppressWarnings("serial")
public class ViewUserInfo extends UgrActionSupport {


    @Autowired
    private UserManager userManager;

    private User user;

    private int fontSize;

    /**
     * @see com.opensymphony.xwork.ActionSupport#execute()
     */
    public String execute() throws Exception {
        this.user = userManager.getUserByUsername(AppContext.getUserName(request));

        return SUCCESS;
    }

   

    /**
     * @return the user
     */
    public User getUser() {
        return user;
    }

    /**
     * @return the fontSize
     */
    public int getFontSize() {
        return fontSize;
    }

    /**
     * @param fontSize the fontSize to set
     */
    public void setFontSize(int fontSize) {
        this.fontSize = fontSize;
    }
}
